<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>resume-management</title>
    <link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/biz/login-register.css">
    <link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/datepicker.css">
    <script src="${contextPath}/resources/js/lib/jquery-1.11.3.js"></script> 
    <script src="${contextPath}/resources/js/lib/bootstrap.js"></script>
    <script src="${contextPath}/resources/js/biz/login-register.js"></script> 
    <script src="${contextPath}/resources/js/lib/bootstrap-datepicker.js"></script>
</head>

<body>
    <nav class="navbar navbar-default">
        <div class="container">
            <ol class="breadcrumb">
              <li class="active">简历平台</li>
              <li class="active">求职者</li>
            </ol>
        </div>
        </div>
    </nav>
    <div class="container">
        <div class="row">
            <div class="col-md-6 col-md-offset-3">
                <div class="panel panel-login">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-6">
                                <a href="#" class="active" id="login-form-link">Login</a>
                            </div>
                            <div class="col-xs-6">
                                <a href="#" id="register-form-link">Register</a>
                            </div>
                        </div>
                        <hr>
                    </div>
                    <#if error??>
                        <div class="alert alert-warning alert-dismissible">
                            <button class="close" data-dismiss="alert"><span>&times;</span></button>
                            <strong>Warning!</strong> ${error} 
                        </div>
                    </#if>
                    <#if msg??>
                        <div class="alert alert-info alert-dismissible">
                            <button class="close" data-dismiss="alert"><span>&times;</span></button>
                            <strong>Info!</strong> ${msg} 
                        </div>
                    </#if>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-lg-12">
                                <form id="login-form" action="${contextPath}/seeker/login" method="post" style="display: block;">
                                    <div class="form-group">
                                        <input type="text" name="name" class="form-control" placeholder="Username" required>
                                    </div>
                                    <div class="form-group">
                                        <input type="password" name="pwd" class="form-control" placeholder="Password" required>
                                    </div>
                                    <div class="form-group">
                                        <div class="row">
                                            <div class="col-sm-6 col-sm-offset-3">
                                                <input type="submit" class="form-control btn btn-login" value="Log In">
                                            </div>
                                        </div>
                                    </div>
                                </form>
                                <form id="register-form" class="form-horizontal" action="${contextPath}/seeker/register" method="post" style="display: none;">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Username</label>
                                        <div class="col-sm-10">
                                            <input class="form-control" type="text" class="form-control" name="name" required>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Password</label>
                                        <div class="col-sm-10">
                                            <input type="password" class="form-control" name="pwd" required>
                                        </div>
                                    </div>
                                     <div class="form-group">
                                        <label class="col-sm-2 control-label">Sex</label>
                                        <div class="col-sm-10">
                                            <select class="form-control" style="width: 15%;" name="sex" required>
                                                <option value="0">男</option>
                                                <option value="1">女</option>
                                            </select>
                                        </div>
                                    </div>
                                     <div class="form-group">
                                        <label class="col-sm-2 control-label">Birthday</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control date-birthday" placeholder="yyyy-mm" name="birthday" required>
                                        </div>
                                    </div>
                                     <div class="form-group">
                                        <label class="col-sm-2 control-label">School</label>
                                        <div class="col-sm-10">
                                            <input type="text"class="form-control" name="school" required>
                                        </div>
                                    </div>
                                     <div class="form-group">
                                        <label class="col-sm-2 control-label">Major</label>
                                        <div class="col-sm-10">
                                            <input type="text"class="form-control" name="major" required>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Degree</label>
                                        <div class="col-sm-10">
                                            <select class="form-control" style="width: 25%;" name="degree" required>
                                                <option value="0">大专</option>
                                                <option value="1">本科</option>
                                                <option value="2">硕士</option>
                                                <option value="3">博士</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Workage</label>
                                        <div class="col-sm-10">
                                            <select class="form-control" style="width: 25%;" name="workage" required>
                                                <option value="0">应届生</option>
                                                <option value="1">1年</option>
                                                <option value="2">2年</option>
                                                <option value="3">3年</option>
                                                <option value="4">4年</option>
                                                <option value="5">5年</option>
                                                <option value="6">5年以上</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Phone</label>
                                        <div class="col-sm-10">
                                            <input type="tel" class="form-control" name="phone" required>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Email</label>
                                        <div class="col-sm-10">
                                            <input type="email" class="form-control" name="mail" required>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">City</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" name="city" required>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="row">
                                            <div class="col-sm-6 col-sm-offset-3">
                                                <input type="submit" class="form-control btn btn-register" value="Register Now">
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
    var current<#if current??> = "${current}"</#if>;
    if (current && current == 'register') {
        $("#register-form").delay(100).fadeIn(100);
        $("#login-form").fadeOut(100);
        $('#login-form-link').removeClass('active');
        $('#register-form-link').addClass('active');
    }

    $(".date-birthday").datepicker({
        format: 'yyyy.mm',
        viewMode: 'years',
        minViewMode: 'months'
    }); 
    </script>

</body>

</html>
